/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author KohLi
 */
@Entity(name="Owner")
public class OwnerEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
    
    private String name; 
    
    private boolean staff;
    private boolean stakeholder;
    private boolean tourist;
    
    
    @OneToOne 
    private MessageFolderEntity mailbox;
    @OneToOne
    private MessageActionEntity action;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OwnerEntity)) {
            return false;
        }
        OwnerEntity other = (OwnerEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.SystemUserEntity[ id=" + id + " ]";
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the staff
     */
    public boolean isStaff() {
        return staff;
    }

    /**
     * @param staff the staff to set
     */
    public void setStaff(boolean staff) {
        this.staff = staff;
    }

    /**
     * @return the stakeholder
     */
    public boolean isStakeholder() {
        return stakeholder;
    }

    /**
     * @param stakeholder the stakeholder to set
     */
    public void setStakeholder(boolean stakeholder) {
        this.stakeholder = stakeholder;
    }

    /**
     * @return the tourist
     */
    public boolean isTourist() {
        return tourist;
    }

    /**
     * @param tourist the tourist to set
     */
    public void setTourist(boolean tourist) {
        this.tourist = tourist;
    }

    

    /**
     * @return the action
     */
    public MessageActionEntity getAction() {
        return action;
    }

    /**
     * @param action the action to set
     */
    public void setAction(MessageActionEntity action) {
        this.action = action;
    }

    /**
     * @return the mailbox
     */
    public MessageFolderEntity getMailbox() {
        return mailbox;
    }

    /**
     * @param mailbox the mailbox to set
     */
    public void setMailbox(MessageFolderEntity mailbox) {
        this.mailbox = mailbox;
    }
    
}
